package com.volunteer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.volunteer.entity.BlackUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 黑名单用户Mapper接口
 */
public interface BlackUserMapper extends BaseMapper<BlackUser> {
    
    /**
     * 检查用户是否在黑名单中
     * @param userId 用户ID
     * @return 存在返回true，不存在返回false
     */
    @Select("SELECT COUNT(*) FROM t_black_user WHERE user_id = #{userId}")
    int checkUserInBlacklist(@Param("userId") Long userId);
} 